From: Keir Fraser Date: Fri, 19 Jun 2009 07:43:58 +0000 (+0100) Subject: x86: Fix legacy irq allocation issue X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~13723 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=65afc94bc6d68cf42c9bfef8c56b50ceba60ed98;p=xen.git x86: Fix legacy irq allocation issue When try to assign vector for irq, we should not assign vector for legacy irq, which has fixed mapped irq<->vector relationship. Signed-off-by: Jiang, Yunhong --- diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c index 8abaab913e..42e2b9d0ea 100644 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -84,6 +84,12 @@ int assign_irq_vector(int irq) spin_lock(&vector_lock); + if ((irq != AUTO_ASSIGN_IRQ) && !IO_APIC_IRQ(irq)) + { + spin_unlock(&vector_lock); + return LEGACY_VECTOR(irq); + } + if ((irq != AUTO_ASSIGN_IRQ) && (IO_APIC_VECTOR(irq) > 0)) { spin_unlock(&vector_lock); return IO_APIC_VECTOR(irq);